package com.doge.controller.admin;

import com.doge.bean.base.BaseRespVo;
import com.doge.bean.pojo.goods.Goods;
import com.doge.bean.pojo.order.Order;
import com.doge.bean.pojo.user.User;
import com.doge.bean.vo.stat.StatGoodsVO;
import com.doge.bean.vo.stat.StatOrderVO;
import com.doge.bean.vo.stat.StatUserVO;
import com.doge.service.admin.stat.StatServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: project2-wechat-mall
 * @description: 统计控制台
 * @author: zhu lei
 * @create: 2021-11-30 21:21
 **/
@RestController
@RequestMapping("admin/stat")
public class StatController {
    @Autowired
    StatServiceImpl statService;

    @RequestMapping("user")
    public BaseRespVo statUser() {
        StatUserVO statUserVO = statService.statUser( );
        return BaseRespVo.ok(statUserVO);
    }
    @RequestMapping("order")
    public BaseRespVo statOrder() {
        StatOrderVO statOrderVO = statService.statOrder( );
        return BaseRespVo.ok(statOrderVO);
    }
    @RequestMapping("goods")
    public BaseRespVo statGoods() {
        StatGoodsVO statGoodsVO = statService.statGoods( );
        return BaseRespVo.ok(statGoodsVO);
    }
}